FROM daocloud.io/golang

RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list

RUN apt update && apt upgrade -y
RUN apt install bash git make gcc g++ python  xz-utils -y

RUN wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin install_dir=~/calibre-bin isolated=y

RUN ln -s /root/calibre-bin/calibre/ebook-convert /usr/local/bin/ebook-convert

#docker build -t wolferhua/calibre .
# /root/calibre-bin/calibre/calibre